<template>
    <div class="after-sales-logger">
        <AFLoggerDefault v-if="curPath.startsWith('default')" ref="AFLoggerDefault"></AFLoggerDefault>
        <AFLoggerCreate v-if="curPath.startsWith('create')" ref="AFLoggerCreate"></AFLoggerCreate>
    </div>
</template>

<script>
    import AFLoggerDefault from "../default/AFLoggerDefault";
    import AFLoggerCreate from "../create/AFLoggerCreate";

    export default {
        name: "AfterSalesLogger",
        components: {AFLoggerCreate, AFLoggerDefault},
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .after-sales-logger {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>